<template>
  <div class="no-more">
    <span v-if="show">没有更多数据了!</span>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false
    }
  },
  mounted() {
    this.$nextTick(() => {
      const parentEle = this.$el.parentElement
      if (parentEle) {
        if (parentEle.scrollHeight > parentEle.clientHeight) {
          this.show = true
        }
      }
    })
  }
}
</script>
<style lang="scss">
.no-more {
  text-align: center;
  font-size: 18px;
  width: 100%;
  padding: 20px 0;
  color: #909191;
}
</style>
